import callApi from '../utils/request';
import {
  API_LOGIN,
  API_SMS_CODE,
  API_LOGOUT,
  API_BALANCE,
  API_SUM_GIFT,
  API_LOGIN_WITH_CODE,
} from '../constants/api';

export function querySumGift(params) {
  return callApi({
    api: API_SUM_GIFT,
    params,
  });
}

export function loginWithCode(params) {
  return callApi({
    api: API_LOGIN_WITH_CODE,
    params,
  });
}

export function login(params) {
  return callApi({
    api: API_LOGIN,
    params,
  });
}

export function smsCode(params) {
  return callApi({
    api: API_SMS_CODE,
    params,
  });
}

export function logout(params) {
  return callApi({
    api: API_LOGOUT,
    params,
  });
}

export function queryBalance(params) {
  return callApi({
    api: API_BALANCE,
    params,
  });
}
